package com.xiaozhi.service.impl;


import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.xiaozhi.dao.DeviceVideoMapper;

import com.xiaozhi.entity.DeviceVideo;
import com.xiaozhi.service.DeviceVideoServer;
import lombok.AllArgsConstructor;

@Service
@AllArgsConstructor
public class DeviceVideoServerImpl implements DeviceVideoServer{
    private final DeviceVideoMapper deviceVideoMapper;
    
    @Override
    @Transactional
    public int add(DeviceVideo pic)
        {
            return deviceVideoMapper.add(pic);
        }

        @Override
        @Transactional
    public DeviceVideo selectVideoByDeviceId(String DeviceId)
        {
            return deviceVideoMapper.selectVideoByDeviceId(DeviceId);
        }

    @Override
    @Transactional
    public int update(DeviceVideo video)
        {
            return deviceVideoMapper.update(video);
        }
}
